package com.example.tests;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;

import org.testng.annotations.Test;

import com.example.fw.GroupObject;
import com.example.fw.Groups;

public class RemoveGroupTests extends TestBase {
	
	@Test
	public void testRemoveFirstGroup() throws Exception {
		Groups oldList = app.getGroupHelper().getGroups();	
 		GroupObject groupToDelete = oldList.getOneGroup();
 		System.out.println("Get "+groupToDelete.id + " id group.");
		app.getGroupHelper().deleteGroup(groupToDelete.id);
		Groups newList = app.getGroupHelper().getGroups();
		assertThat(newList, equalTo(oldList.without(groupToDelete)));
	}
}